const { Schema, model } = require('mongoose')
const complaintsSchema = new Schema({
    name: {
        type:Schema.Types.ObjectId,
        ref: 'tenantsModel'
    },
    date: String,
    state: {
        type:Boolean,
        default:false
    },
    cplTarget: {
        type:Schema.Types.ObjectId,
        ref:'lessorsModel'
    },
    content:String,
    results:String,
}, { versionKey: false });
const complaintsModel = model('complaintsModel', complaintsSchema, "complaints");
module.exports.complaintsModel = complaintsModel;